package com.jianneng.jdg.model.fragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.Toast;

import com.example.com.jianneng.jdg.R;
import com.jianneng.jdg.model.adapter.MyNewAdapter;
import com.jianneng.jdg.model.gallery.MyNewService;

public class FragmentCircleWorkFriend extends Fragment {
	private ListView mEducationListView;
	private MyNewAdapter mAdapter;//模拟数据
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_circle_workfriend, container, false);
		mEducationListView = (ListView) view.findViewById(R.id.education_listview);
		mAdapter = new MyNewAdapter(getActivity(), MyNewService.getMyNew());
		mEducationListView.setAdapter(mAdapter);
		return view;
	}
	
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		
		super.onActivityCreated(savedInstanceState);
		mEducationListView.setOnItemClickListener(new MyOnItemClickListener());
		
	}
	public class MyOnItemClickListener implements OnItemClickListener{

		@Override
		public void onItemClick(AdapterView<?> parent, View view, int position,
				long id) {
			
			Toast.makeText(getActivity(), position+"学你妹啊", 1).show();
		}
		
	}


	

	
	
}
